<template>
    <div>
  <p>{{ t("message.hello") }}</p>
  <button @click='change'>切换</button>
    </div>
</template>

<script setup>
useI18n()
import { useI18n } from 'vue-i18n';
const {t,locale} = useI18n()
let change=()=>{
 if(locale.value=='en'){
   locale.value='zh'
 }else{
   locale.value='en'
 }
}


// const dj=()=>{
//     i18n.legacy = 'cn';
// }

</script>

<style lang='scss' scoped >

</style>
